Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix test-debugger-pid #6584

Merged
merged 1 commit into from
May 11, 2016
Merged

Conversation

santigimeno
Copy link
Member

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

And move it to parallel.

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 4, 2016
@santigimeno
Copy link
Member Author

@mscdex mscdex added the debugger label May 4, 2016
@cjihrig
Copy link
Contributor

cjihrig commented May 5, 2016

The test in question failed during the CI run.

@santigimeno
Copy link
Member Author

It looks like the output in Windows is different:

# assert.js:90
#   throw new assert.AssertionError({
#   ^
# AssertionError: '(node:4660) Target process: 655555 doesn\'t exist.' === '(node:4660) There was an internal error in Node\'s debugger. Please report this bug.'
#     at ChildProcess.<anonymous> (C:\workspace\node-test-binary-windows\RUN_SUBSET\3\VS_VERSION\vs2013\label\win2008r2\test\parallel\test-debugger-pid.js:28:10)
#     at emitOne (events.js:96:13)
#     at ChildProcess.emit (events.js:188:7)
#     at C:\workspace\node-test-binary-windows\RUN_SUBSET\3\VS_VERSION\vs2013\label\win2008r2\test\parallel\test-debugger-pid.js:18:16
#     at Array.forEach (native)
#     at Socket.onData (C:\workspace\node-test-binary-windows\RUN_SUBSET\3\VS_VERSION\vs2013\label\win2008r2\test\parallel\test-debugger-pid.js:17:8)
#     at emitOne (events.js:96:13)
#     at Socket.emit (events.js:188:7)
#     at readableAddChunk (_stream_readable.js:172:18)
#     at Socket.Readable.push (_stream_readable.js:130:10)

Does anyone know if it has been always like this?

@bnoordhuis
Copy link
Member

@santigimeno Grep for the Windows version of DebugProcess() in src/node.cc.

That error you're seeing is the 'uncaughtException' event handler in lib/_debugger.js. I speculate this code fails with the error message from OpenProcess() call in DebugProcess() instead of the expected ESRCH exception, and that ends up triggering the handler.

@santigimeno santigimeno force-pushed the debugger branch 3 times, most recently from d4b7364 to 67c75b5 Compare May 10, 2016 10:50
@santigimeno
Copy link
Member Author

@bnoordhuis yes, thanks for looking into it. I can confirm your speculation and the error reported in Windows is:

# c:\workspace\node-stress-single-test\nodes\win2012r2\Release\node.exe debug -p 655555
# debug> (node:1776) There was an internal error in Node's debugger. Please report this bug.
# The parameter is incorrect.
# Error: The parameter is incorrect.
#     at Error (native)
#     at Interface.trySpawn (_debugger.js:1668:17)
#     at Interface.run (_debugger.js:1043:10)
#     at Timeout._onTimeout (_debugger.js:835:10)
#     at tryOnTimeout (timers.js:224:11)
#     at Timer.listOnTimeout (timers.js:198:5)

I have updated the PR so it handles the Windows case accordingly.

CI run: https://ci.nodejs.org/job/node-test-commit/3248/. Apart from the usual suspects the run looks good.

@bnoordhuis
Copy link
Member

I think I'd rather just skip the test on Windows instead of checking for that 'There was an internal error' message.

@santigimeno
Copy link
Member Author

I'm also checking for the The parameter is incorrect string that seemed a little more specific. Anyway, I'll skip it if you prefer it that way.

@bnoordhuis
Copy link
Member

Some test coverage is better than no coverage, I suppose. I'll leave it up to you, LGTM either way.

@santigimeno
Copy link
Member Author

/cc @nodejs/testing what do you think? It's fine by me either way

@Trott
Copy link
Member

Trott commented May 11, 2016

LGTM the way it is. Fine skipping on Windows too. Slight preference for leaving it the way it is so that if the behavior ever becomes consistent, we find out rather than forever skipping the test.

The current format that prints the process PID before the actual
message.

Adapt the test so it also passes on Windows, that emits a different
message from the rest of platforms.

Move the test to parallel.

PR-URL: nodejs#6584
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@santigimeno
Copy link
Member Author

One last CI run: https://ci.nodejs.org/job/node-test-pull-request/2573/ and it's green.

@santigimeno santigimeno merged commit 588cfc5 into nodejs:master May 11, 2016
@santigimeno santigimeno deleted the debugger branch May 11, 2016 08:09
@santigimeno
Copy link
Member Author

Finally I left the Windows part. Thanks for the reviews!

@Trott
Copy link
Member

Trott commented May 11, 2016

Looks like this was landed in 588cfc5

evanlucas pushed a commit that referenced this pull request May 17, 2016
The current format that prints the process PID before the actual
message.

Adapt the test so it also passes on Windows, that emits a different
message from the rest of platforms.

Move the test to parallel.

PR-URL: #6584
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@MylesBorins
Copy link
Contributor

@Trott lts?

@Trott
Copy link
Member

Trott commented Jun 2, 2016

@thealphanerd I think perhaps you meant to ping @santigimeno rather than me?

@santigimeno
Copy link
Member Author

@thealphanerd No, it should not be backported. It works as expected in 4.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants